package catp02;

import java.util.Scanner;
import java.util.Arrays;

public class Main3 {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		while(true){
		int n=Integer.parseInt(sc.nextLine());
		String[][] str = getDynamicMatrix(n);

		for(int i=1;i<=n;i++){
			int flag=0;

			for(int j=1;j<=i;j++){

				int d=i*j;
				str[i-1][j-1]=i+"*"+j+"="+(i*j);
				System.out.print(i+"*"+j+"="+d);
				if(i!=j)System.out.print("  ");
				if(i==j){
					System.out.println();
				}
			}

		}
		System.out.println(Arrays.deepToString(str));
	}
	}
	public static String[][] getDynamicMatrix(int n) 
	{
		String[][] strs = new String[n][];
		for (int i = 0; i < n; i++) 
			strs[i] = new String[i+1];
		return strs;
	}
}
